<!-- toaster directive -->
<toaster-container toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>
<!-- / toaster directive -->

<!-- 导航条 -->
<div class="bg-white bread-crumb">
    <ul class="breadcrumb b-a m-b-n-xs lter b-b wrapper-md">
        <li><a ui-href="main"><i class="glyphicon glyphicon-cog"></i>  系统管理</a>
        <li><a ui-sref="main.sys.user.list" ng-bind="title"></a></li>
        <!--<li class="active"><img src="res/img/logo1.png" alt=""></li>-->
    </ul>
</div>

<!-- 加载提醒 -->
<div ng-show="loading" class="text-center m-t-md text-lg dataWarn"><i class="fa fa-spin fa-spinner"></i> 数据加载中...</div>
<!-- 内容区域 -->
<div ng-hide="loading" class="wrapper-md content">
    <!-- 数据显示-->
    <div class="wrapper-data clearfix">
        <div class="panel panel-default clearfix">
        	
        	<div class="col-lg-2 tree-col-lg-2">
				<div ui-tree="treeOptions" id="tree-root">  
				   <ol ui-tree-nodes ng-model="angularTreeList">
					 <li ng-repeat="item in angularTreeList" ui-tree-node ng-include="readonly?'angularTreeReadOnlyTemplate':'houseRegionTreeTemplate'">

					 </li>
				   </ol>
				</div>
			</div>
			<div class="col-lg-10 table-col-lg-10">
            <!-- 头部 -->
	            <div class="panel-heading clearfix">
					<div class="w-auto">
						<form ng-submit="search()" class="form-inline">
							<div class="form-group" style="margin-right: 15px;">
								<label for="">当前区域：</label>
								<span ng-show="regionName==null"></span>
								<span ng-show="regionName!=null" ng-bind="regionName"> </span>
							</div>
							<div class="form-group">
								<label for="identity">操作员昵称：</label> 
								<input type="text" ng-model="param.username" class="form-control" style="width: 180px">
							</div>
							<!--<div class="form-group">-->
								<!--<label>类型：</label> -->
								<!--<select class="form-control" ng-model="param.usertype" name="userType" style="width: 200px">-->
									<!--<option value="" ng-selected="1"></option>-->
									<!--<option ng-repeat="(key,value) in userTypes" value="{{key}}">{{value}}</option>-->
								<!--</select>-->
							<!--</div>-->
							<div class="form-group">
								<button type="submit" class="btn btn-primary new-primary"
									style="margin-left: 10px" ng-show="read">查询</button>
							</div>
							<div class="form-group">
								<div ng-show="param.regionId == null">
									<a ng-click="showMsg('请选择区域')" class="btn btn-primary addNew" ng-if="add"><i class="glyphicon glyphicon-plus"></i>新增</a>
								</div>
								<div ng-show="param.regionId != null">
									<a ui-sref="main.sys.user.create({'regionId':param.regionId,'regionName':regionName})" class="btn btn-primary addNew"  ng-hide="hasAdd"><i class="glyphicon glyphicon-plus"></i>新增</a>
								</div>
							</div>
						</form>
					</div>
				</div>
			
            <!-- 数据表格 -->
            <div class="table-responsive">
                <table class="table table-striped b-t b-light text-center">
                    <thead>
                    <tr>
                    	<th>操作员账号</th>
                        <th>操作员昵称</th>
                        <th>区域</th>
                        <!--<th>用户类型</th>-->
                        <th>状态</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr ng-repeat="item in pageInfo.data">
                    	<td class="v-middle">{{item.account_}}</td>
                        <td class="v-middle">{{item.user_name}}</td>
                        <td class="v-middle">{{item.regionName}}</td>
                        <td class="v-middle">
                            <span ng-show="item.enable_==0" class="text-danger">禁用</span>
                            <span ng-show="item.enable_==1" class="text-success">启用</span>
                        </td>
                        <td class="v-middle">
                       		<a ui-sref="main.sys.user.detail({id: item.id_})" ng-show="read">详情</a>
                            <a ui-sref="main.sys.user.update({id: item.id_})" ng-show="update">编辑</a>
                            <button ng-click="delItem(item.id_,item.user_name)"  ng-show="dele" type="button" style="border: none;color:#fb7009 ; background:none;border-radius: 5px;">
								<i class="fa m-r-xs text-sm"></i>删除
							</button>
							<button type="button" ng-show="item.enable_==0"  ng-click="disableItem(item.id_,1,item.user_name)" style="border:solid 1px;color:#fb7009;background:none;border-radius:4px;">
								<i class="fa  m-r-xs text-sm"></i>启用</button>
							<button type="button" ng-show="item.enable_==1"  ng-click="disableItem(item.id_,0,item.user_name)" style="border:solid 1px;color:#fb7009;background:none;border-radius:4px;">
								<i class="fa  m-r-xs text-sm"></i>禁用</button>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div><!-- /.table-responsive -->

            <!-- 底部分页 -->
			<span data-ng-include=" 'src/tpl/pageInfo.html' "></span>
			</div>
        </div><!-- /.panel -->
    </div><!-- /.wrapper-data -->

</div><!-- /.wrappemd -->